package edu.xlh.travel.service;

import com.alibaba.fastjson.JSONArray;
import edu.xlh.travel.common.Result;
import edu.xlh.travel.pojo.User;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpSession;
import java.util.Map;
import java.util.Optional;


public interface UserService {

    Result login(Map<String, String> hashMap, String verKey, HttpSession session);

    Result findByMobile(String mobileValue);

    Result findByEmail(String email);

    Result register(User user, String code);

    void sendSms(String mobile);

    void updateByPrimaryKeySelective(User user);

    Optional<User> findById(String userId);

    Result findAll(int page, int limit , HttpSession session);

    Result edit(String id, User user , HttpSession session);

    Integer getUserCount();

    Result getUserInfo(HttpServletRequest reques);

    Result change(User user, HttpSession session);

    void updateIsVipByUserId(String userId , String isVip);

    Result batchDelete(JSONArray jsonArray, HttpSession session);

    Result wechatLogin(HttpSession session);

    Result doVip(HttpSession session);

    Result QueryUserByCondition(Integer page, Integer limit, User user, HttpSession session);

    Result checkIsVip(HttpSession session);
}
